<?php

use Phalcon\Mvc\Model;

class BlogTypes extends Model{
    protected $id;
    protected $name;

    public function initialize() {
        $this->hasMany("id", "Blogs", "blog_type");
    }

    public function getSource() {
		return "lb_blog_type";
	}

    public function getId() {
        return $this->id;
    }

    public function getName() {
        return $this->name;
    }

    public function convertToArray() {
        $result = array(
            'id'        =>  (int)$this->id,
            'name'  =>  $this->name
        );

        return $result;
    }
}
